import { express } from '@/utils/express/express.js'
import isToken from '@/utils/token/token.js'
export const getvideos = () => {
  return express.get('api/getvideos')
}

export const getvideosdetail = (data) => {
  return express.get('api/getvideosdetail', {
    params: { id: data }
  })
}

export const videogood = (data) => {
  return express.post('user/good', data, {
    headers: {
      'Authorization': isToken()
    }
  })
}

export const videodisgood = (data) => {
  return express.post('user/disgood', data, {
    headers: {
      'Authorization': isToken()
    }
  })
}

export const videostar = (data) => {
  return express.post('user/star', data, {
    headers: {
      'Authorization': isToken()
    }
  })
}

export const videocoin = (data) => {
  return express.post('user/coin', data, {
    headers: {
      'Authorization': isToken()
    }
  })
}

export const isLook = (data) => {
  return express.get('user/isLook', {
    params: { id: data },
    headers: {
      'Authorization': isToken()
    }
  })
}

export const videosubscribe = (data) => {
  return express.post('user/subscribe', data, {
    headers: {
      'Authorization': isToken()
    }
  })
}

export const getfriends = () => {
  return express.get('user/getfriends', {
    headers: {
      'Authorization': isToken()
    }
  })
}

export const getMyselfVideo = () => {
  return express.get('user/get_someone_videos', {
    headers: {
      'Authorization': isToken()
    }
  })
}

export const getMyGood = () => {
  return express.get('user/get_good_who', {
    headers: {
      'Authorization': isToken()
    }
  })
}

export const getMyStar = () => {
  return express.get('user/get_start', {
    headers: {
      'Authorization': isToken()
    }
  })
}

export const getOtherGood = (data) => {
  return express.get('api/get_good_who', {
    params: { up: data }
  })
}

export const getOtherStar = (data) => {
  return express.get('api/get_start', {
    params: { up: data }
  })
}

export const getOtherVideo = (data) => {
  return express.get('api/get_someone_videos', {
    params: { up: data }
  })
}

export const getIdolVideo = () => {
  return express.get('user/getIdolVideo', {
    headers: {
      'Authorization': isToken()
    }
  })
}

export const sendComment = (data) => {
  return express.post('user/sendComment', data, {
    headers: {
      'Authorization': isToken()
    }
  })
}

export const getCommentWithToken = (data) => {
  return express.get('user/getComment',{
    headers: {
      'Authorization': isToken()
    },
    params: { id: data }
  })
}

export const getComment = (data) => {
  return express.get('api/getComment', {
    params: { id: data }
  })
}

export const disgoodComment = (data) => {
  return express.get('user/disgoodComment',{
    headers: {
      'Authorization': isToken()
    },
    params: { id: data }
  })
}

export const goodComment = (data) => {
  return express.get('user/goodComment',{
    headers: {
      'Authorization': isToken()
    },
    params: { id: data }
  })
}

export const addhistory = (data) => {
  return express.get('user/addhistory',{
    headers: {
      'Authorization': isToken()
    },
    params: { id: data }
  })
}

export const gethistory = () => {
  return express.get('user/gethistory',{
    headers: {
      'Authorization': isToken()
    }
  })
}